#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef int SLDataType;
typedef struct SListNode
{
	struct SListNode* next;
	SLDataType Data;
}SLNode;
SLNode* BuyNode(SLDataType X)
{
	SLNode* newnode = (SLNode*)malloc(sizeof(SLNode));
	if (newnode == NULL)
	{
		printf("malloc is fail\n");
	}
	else
	{
		newnode->next = NULL;
		newnode->Data = X;
	}
	return newnode;
}
void SLNodePushBack(SLNode** pHead, SLDataType X)
{
	SLNode* newnode = BuyNode(X);
	if (*pHead == NULL)
	{
		*pHead = newnode;
	}
	else
	{
		SLNode* tail = *pHead;
		while (tail->next != NULL)
		{
			tail = tail->next;
		}
		tail->next = newnode;
	}
}
int SLNodeSum(SLNode* pHead)
{
	SLNode* tail = pHead;
	int sum = 0;
	while (tail != NULL)
	{
		sum += tail->Data;
		tail = tail->next;
	}
	return sum;
}
int main()
{
	SLNode* PList = NULL;
	int i, n = 0;
	int arr[100] = { 0 };
	scanf("%d\n", &n);
	for (i = 0; i < n; i++)
	{
		scanf("%d ", &arr[i]);
		SLNodePushBack(&PList, arr[i]);
	}
	int sum = SLNodeSum(PList);
	printf("%d ", sum);
	return 0;
}